﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LinQ_DTO;
using DAO;

namespace BUS
{
    public class LoaiSanPhamBUS
    {
        public List<shop_loaisanpham> LayLoaiSanPham()
        {
            LoaiSanPhamDAO Dao = new LoaiSanPhamDAO();
            return Dao.LayLoaiSanPham();

        }

      
        public shop_loaisanpham LayLoaiSanPhamTheoMa(int MaLoai)
        {
            LoaiSanPhamDAO Dao = new LoaiSanPhamDAO();
            return Dao.LayLoaiSanPhamTheoMa(MaLoai);
        }

        public void ThemLoaiSanPham(shop_loaisanpham a)
        {
            LoaiSanPhamDAO Dao = new LoaiSanPhamDAO();
            Dao.ThemLoaiSanPham(a);

        }

        public void XoaLoaiSanPhamTheoMa(int MaLoai)
        {
            LoaiSanPhamDAO Dao = new LoaiSanPhamDAO();
            Dao.XoaLoaiSanPhamTheoMa(MaLoai);

        }

        public void CapNhatSP(shop_loaisanpham a)
        {

            LoaiSanPhamDAO Dao = new LoaiSanPhamDAO();
            Dao.CapNhatSP(a);
        }

        /************************************************************************************************************        *                          coder: TRAN KINH LY 
         ***********************************************************************************************************/

        public List<shop_loaisanpham> layLoaiSanPhamGioiHan(int iStart, int iLimit)
        {
            LoaiSanPhamDAO Dao = new LoaiSanPhamDAO();
            return Dao.layLoaiSanPhamGioiHan(iStart, iLimit);
        }

        public int laySoLuongLoaiSanPham()
        {
            LoaiSanPhamDAO Dao = new LoaiSanPhamDAO();
            return Dao.laySoLuongLoaiSanPham();
        }

        public List<shop_loaisanpham> LayLoaiSanPhamTheoKhoa(String key_search)
        {
            LoaiSanPhamDAO Dao = new LoaiSanPhamDAO();
            return Dao.LayLoaiSanPhamTheoKhoa(key_search);
        }

        /************************************************************************************************************        *                          coder: TRAN KINH LY 
         ***********************************************************************************************************/

    }
}
